<?#//v.3.0.2
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

#Modified by Frederic 2008
reset($LANGUAGES);
while(list($k,$v) = each($LANGUAGES)){
	include "../includes/messages.".$k.".inc.php";
	$result = mysql_query ( "SELECT distinct c.cat_id, t.cat_name FROM PHPAUCTIONXL_categories c, PHPAUCTIONXL_cats_translated t WHERE c.parent_id='0' AND c.deleted=0 AND c.cat_id=t.cat_id AND t.lang='".$k."' ORDER BY cat_name" );

        $output = "<tr>";
        $vert = 0;
        while ( $row = mysql_fetch_array ( $result ))
         {
           $cat_url = "./browse.php?id=" .$row['cat_id'];
           $cat_name = $row['cat_name'];
           $output .= "<td width=\"300\" align=\"left\"> <a href=\"$cat_url\">$cat_name</a> </td>";
           if ( $vert++ > 3 )
           {
             $output .= "</tr> <tr>";
             $vert = 0;
           }
         }
        $output .= "</tr>";



	$handle = fopen ( "../includes/categories_select_box.".$k.".inc.php" , "w" );
	fputs ( $handle, $output );
	fclose ($handle);
}
?>
